<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>watched用法</title>
    <script src="../js/vue.js"></script>
</head>
<body>

    <div id="app">
        {{title}}
        <input type="text" v-model="title">
    </div>

</body>
<script>
    var vi = new Vue({
        el:"#app",
        data:{
            title:"hello vue"
        },
        watch:{
            title:function (newValue , oldValue) {
                console.log(newValue +":"+ oldValue);
            }
        }


    })
</script>
</html>